import request from "@/utils/request"

//查询所有部门详细信息
export function queryDetailsAll() {
    return request({
        url: `/joinservice/join-dept-detail/getAllDeptDetails`,
        method: 'GET',
    }).then(res => res.data)
}

//获取全部部门信息
export function queryDeptsAll() {
    return request({
        url: `/joinservice/join-dept/getAllDepts`,
        method: 'GET',
    }).then((res) => res.data);
}

//根据id获取用户绑定部门信息
export function getDeptsByUserId(userId) {
  return request({
    url: `/joinservice/join-user-dept/getDeptsByUserId/${userId}`,
    method: 'GET',
  }).then((res) => res.data);
}

//根据clubId查询部门信息
export function queryDepts(clubId) {
  return request({
      url: `/joinservice/join-dept/getDeptByClubId`,
      method: 'Get',
      params: {clubId}
  }).then((res) => res.data);
}

//根据clubId查询部门信息
export function queryDeptDetail(deptId) {
  return request({
      url: `/joinservice/join-dept-detail/getDeptDetailByDeptId/${deptId}`,
      method: 'POST',
      params: {deptId}
  }).then((res) => res.data);
}
